<?php
/**
 * Created by PhpStorm.
 * User: peter
 * Date: 2018/10/19
 * Time: 下午12:01
 */

namespace app\model;


use think\model\concern\SoftDelete;

class ActivityOrderAttach extends Base
{
    protected $pk = 'id';
    // 此处表名请务必设置为public
    public $table = 'activity_order_attach';
    protected $autoWriteTimestamp = true; //自动时间戳
    protected $createTime  = 'create_at';
    protected $updateTime  = 'update_at';
    // 软删除
    use SoftDelete;
    protected $deleteTime = 'delete_at';
    protected $defaultSoftDelete = 0;

    /**
     * @purpose 关联活动集合点模型
     * @return \think\model\relation\HasOne
     */
    public function activityCollectionPoint ()
    {
        return $this->hasOne('ActivityCollectionPoint', 'id', 'collection_point_id');
    }
}